<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
	<meta charset="utf-8">
	<pre>
<?php
<!--对数组中的元素按照字母升序排列-->
$cars=array("Volvo","BMW","Toyota");
sort($cars);
echo $cars;
<!--降序-->
$cars=array("Volvo","BMW","Toyota");
rsort($cars);
print_r($cars);
<!--对数组中的元素按照数字升序排列-->
$numbers=array(4,6,2,22,11);
sort($numbers);
print_r($numbers);
<!--降序-->
$numbers=array(4,6,2,22,11);
rsort($numbers);
print_r($numbers);
?></pre>
</body>
</html>